//
//  UIView+BQChangeFrameValue.m
//  Depressed.domo
//
//  Created by rimi on 16/5/31.
//  Copyright © 2016年 薛涛. All rights reserved.
//

#import "UIView+BQChangeFrameValue.h"

@implementation UIView (BQChangeFrameValue)

- (void)setOrigin:(CGPoint)origin{
    CGRect rect = self.frame;
    rect.origin = origin;
    self.frame = rect;
}
- (CGPoint)origin{
    return self.frame.origin;
}


- (void)setX:(CGFloat)x{
    CGRect rect = self.frame;
    rect.origin.x = x;
    self.frame = rect;
}
- (CGFloat)x{
    return self.origin.x;
}


- (void)setY:(CGFloat)y{
    CGRect rect = self.frame;
    rect.origin.y = y;
    self.frame = rect;
}
- (CGFloat)y{
    return self.origin.y;
}


- (void)setSize:(CGSize)size{
    CGRect rect = self.frame;
    rect.size = size;
    self.frame = rect;
}
- (CGSize)size{
    return self.frame.size;
}


-(void)setWidth:(CGFloat)width{
    CGRect rect = self.frame;
    rect.size.width = width;
    self.frame = rect;
}
-(CGFloat)width{
    return self.size.width;
}


-(void)setHeigth:(CGFloat)heigth{
    CGRect rect = self.frame;
    rect.size.height = heigth;
    self.frame = rect;
}
-(CGFloat)heigth{
    return self.size.height;
}
@end
